﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sunyard.BPO.Database;
using MODI;

namespace WindowsTest
{
    class DataBaseHelper
    {
        /// <summary>
        /// 数据库类型
        /// </summary>
        private string DatabaseType { get; set; }

        /// <summary>
        /// 数据库连接串
        /// </summary>
        private string ConnectionString { get; set; }

        /// <summary>
        /// 构造数据库操作实例
        /// </summary>
        /// <returns></returns>
        public Database GetDatabaseInstance()
        {
            return Database.CreateInstance(DatabaseType, ConnectionString);
        }
        public DataBaseHelper(string strConnection, string strType)
        {
            DatabaseType = strType;
            ConnectionString = strConnection;
        }
    }
}
